<template>
  <el-date-picker v-model="data" type="date" placeholder="请选择日期" />
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'
type optionsType = {
  label: string
  value: string
}
const props = defineProps({
  options: { type: Array<optionsType>, required: false, default: () => [] },
  resetData: { type: Number, required: false, default: 0 }
})

watch(
  () => props.resetData,
  () => {
    data.value = ''
  }
)

defineExpose({ props })

const data = ref()
</script>
